package com.mall.common.response;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2021/7/14 15:03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResponse<T> implements Serializable {

    /**
     * 业务状态码 0:成功 -1失败
     */
    private Integer code;

    /**
     * 业务描述
     */
    private String message;
    /**
     * 返回的数据
     */
    private T data;

    public CommonResponse(Integer code,String message){
        this.code = code;
        this.message = message;
    }

}
